package cn.wzby;

public class Str6 {
    public static void main (String [] args){
        String s = "    hello   ,   java   ";
        String a = "A\nB\nc";
        System.out.println(s.trim());
        //.trim()清除字符串首尾的空格
        System.out.println(s.isBlank());
        //.isBlank()检查字符串是否为空白
        System.out.println(s.stripLeading());
        //.stripLeading（）清除首部的空格
        System.out.println(s.stripTrailing());
        //.stripTrailing（）清除尾部的空格
        System.out.println(a.lines().count());
        //行数统计
    }
}
